Set
Function
This API is used to import Channel > IPChannel page parameters.
Request Message
Parameter Description
Table 1
Parameter | Range | Type | Description |
---|---|---|---|
channel | “CH1”…”CH1x” “IP_CH1”…” IP_CH1x” “WIFI_CH1”…” WIFI_CH1x” The number of channels depends on the capability of the equipment | string array | Each array bit represents a channel with a string |
base_secondary_authentication | object | Encrypted information for authentication. See base_secondary_authentication information table for structure members details. | |
chn | string | Import channel information and add it to the channel | |
username | string | Username used for IPC login | |
ip/urlmain;urlsub | string | IPC IP address | |
camera mode | string | Connection mode 0-Auto 1-Normal 2-Fisheye 3-Binocular | |
max channel | string | Maximum number of channels for front-end devices | |
connect mode | string | Connection agreement | |
base_enc_password | Json Object | Encrypted Password,see base_enc_password for more information. |
Sample:
POST /API/ChannelConfig/IpcInfoList/Set HTTP/1.1
{
"version": "1.0",
"data": {
"base_secondary_authentication": {
"seq": 4,
"cipher": "QKjxiEirYYvWpVH95ajXREGTIvFB1ICNLQ7xlxg82t0="
},
"channel_info": [
{
"chn": "5",
"username": "admin",
"port": "80",
"ip/urlmain;urlsub": "172.16.11.138",
"protocol(private:1;onvif:2;rtsp:3)": "1",
"connect mode": "0",
"max channel": "1",
"camera mode": "Auto",
"base_enc_password": {
"seq": 0,
"peer_key": "0N9T+VoMORBB8/l1Jbu4cTv0uXdGI/H/6MZbIvsPuNmQ=",
"cipher": "0U2JuJiB7tgKN1bocrnQlypHouBHW5hKzV240q4SmnuDiY2ah"
}
}
]
}
}
Sample:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": "success",
"data": {}
}
Error Code
See Response Messages Body and Common error_code for more information.